On three separate occasions during the show at Riverfront Park, police said they "noticed what they believed were weapons being carried in the crowd of people," said Mayor Wanda R.D. Williams in a statement.
They fled when officers approached them, according to officials.
A juvenile was later found with a Glock with a 24-round magazine, and an adult man with another juvenile was seen throwing a gun into the river as he fled, according to authorities. All three were reportedly arrested.
Yet another juvenile was caught with a BB gun and later released, police said.
"Other kids were setting off firecrackers and running. One person ran into me and fell on my leg," Mayor Williams wrote.
Police said the mayor was knocked over and suffered minor injuries.
"Commissioner Carter made the decision at that point to end the fireworks show early for everyone’s safety."
"Aside from being furious at what happened, I am deeply indebted to the heroic actions of our Harrisburg Bureau of Police officers," she continued.
"When they spotted potential danger, they ran towards it, and in the process, prevented what could have been a disaster."
No shots were fired during the incident, Harrisburg police added.
Click here to follow Daily Voice Waynesboro and receive free news updates.